package com.changgou.oauth.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ：hushengjin
 */

@Controller
@RequestMapping("/oauth")
public class LoginRedirect {

    /**
     * 跳转到登录页面
     *
     * @return
     */
    @RequestMapping("/login")
    public String login(@RequestParam(value = "FROM") String from, Model model) {
        //将请求参数添加到model中,返回给前端页面
        model.addAttribute("from", from);
        return "login";
    }

}
